import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class SubmitButton extends StatelessWidget {
  final String txt;
  final ShapeBorder shape;
  final Color color;
  final VoidCallback onPressed;
  final double radiusSize;
  final buttonWidth;
  final buttonHeight;

  const SubmitButton(
      {this.txt = "确定",
      this.buttonWidth = double.infinity,
      this.buttonHeight = 44.0,
      this.shape,
      this.color = Colors.blueAccent,
      this.onPressed,
      this.radiusSize = 20.0})
      : super();

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: Container(
        width: buttonWidth,
        //高度
        height: buttonHeight,
        child: RaisedButton(
          color: color,
          textColor: Colors.white,
          textTheme: ButtonTextTheme.normal,
          child: Text(
            "确定",
            style: TextStyle(color: Colors.white),
          ),
          shape: StadiumBorder(),
          onPressed: onPressed,
        ),
      ),
    );
  }
}
